﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.Model;
using System.Data;

namespace AspNetCs.IDAL
{
    public interface IAgent
    {

        /// <summary>
        /// 代理商登录
        /// </summary>
        /// <param name="Un"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        int AgentLogin(AgentModel model);

        /// <summary>
        /// 添加代理商
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int AddAgent(AgentModel model);

        /// <summary>
        /// 修改代理商
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int UpdateAgent(AgentModel model);

        /// <summary>
        /// 代理商资料
        /// </summary>
        /// <param name="dr"></param>
        /// <returns></returns>
        AgentModel GetModel(DataRow dr);

        AgentModel GetModel(int id);

        /// <summary>
        /// 当代理商登录以后,更新代理商最后登录资料
        /// </summary>
        /// <param name="id"></param>
        void UpdateAgentLast(int id);

        DataTable GetDataTable(string filter);

    }
}
